# print('\033[31;42;1mYou Win!!!\033[0m')
# print('\033[31;42;1mYou Close\033[0m')
# import random
# option = ['石头', '剪刀', '布']
# prompt = '''(0) 石头
# (1) 剪刀
# (2) 布: '''
# com    = random.choice(option)
#
# wins   = [['石头', '剪刀'], ['剪刀', '布'], ['布', '石头']]
# i = int(input(prompt))
# player = option[i]
#
# print('你出的：%s, 计算机出的：%s ' % (player, com))
# if player == com :
#     print('平手')
# elif [player, com] in wins:
#     print('\033[31;42;1mYou Win!!\033[0m')
# else:
#     print('\033[31;42;1mYou Lose!!\033[0m')

from random import choice
# pwin = 0
# cwin = 0
option = ['石头', '剪刀', '布']
wins   = [['石头', '剪刀'], ['剪刀', '布'], ['布', '石头']]
prompt = '''(0) 石头
(1) 剪刀
(2)  布
请出拳'''

computer = choice(option)
i  = int(input(prompt))
player = option[i]
print('你出的： %s, 计算机出的: %s' % (player, computer))
# while cwin < 2 and pwin < 2:
if player == computer:
    print('平手')
elif [player, computer] in wins:
    print('\033[31;42;1mYou Win!!!\033[0m')
    # pwin += 1
else:
    print('\033[31;42;1mYou Close!!!\033[0m')
    # cwin += 1